import os
import subprocess
import sys
print(" _____           _                  _                       _  __ _      ")
print("|  __ \         | |                | |                     (_)/ _(_)     ")
print("| |__) | __ ___ | |_ ___   ___ ___ | |  ___ _ __   ___  ___ _| |_ _  ___ ")
print("|  ___/ '__/ _ \| __/ _ \ / __/ _ \| | / __| '_ \ / _ \/ __| |  _| |/ __|")
print("| |   | | | (_) | || (_) | (_| (_) | | \__ \ |_) |  __/ (__| | | | | (__ ")
print("|_|   |_|  \___/ \__\___/ \___\___/|_| |___/ .__/ \___|\___|_|_| |_|\___|")
print("                                           | |                           ")
print("                                           |_|                           ")
print("       _   _             _    ")
print("      | | | |           | |   ")
print("  __ _| |_| |_ __ _  ___| | __")
print(" / _` | __| __/ _` |/ __| |/ /")
print("| (_| | |_| || (_| | (__|   < ")
print(" \__,_|\__|\__\__,_|\___|_|\_\\")
print("\033[1;32;40m[*]Protocol specific attack refers to an attack targeting a specific protocol, typically pertaining to network communication protocols. These protocols govern how data is transmitted over a network, including data encapsulation, control information during transmission, and so on.")
print("\033[1;37;40m")
files = {
    1: {"name": "ddos/Protocol_specific_attack/Minecraft_Protocol_Attacks.py", "description": "Minecraft Protocol Attacks"},
    2: {"name": "ddos/Protocol_specific_attack/SSDP_attack.py", "description": "SSDP Attack"}
}

def run_python_file(file_number):
    if file_number in files:
        file_info = files[file_number]
        file_name = file_info["name"]
        file_description = file_info["description"]
        if os.path.exists(file_name) and file_name.endswith('.py'):
            print("ok")
            subprocess.run([sys.executable, file_name])
        else:
            print("Error: File does not exist.")
    else:
        print("Error: Invalid selection.")

def main():
    print("Input attack mode：")
    for num, file_info in files.items():
        print(f"[{num}] {file_info['description']}")
    choice = int(input("Please enter the number: "))
    run_python_file(choice)

if __name__ == "__main__":
    main()
    
#sansjtw https://sansjtw.xyz https://github.com/sansjtw